<script setup lang="ts">
import { ref } from 'vue'
import Child from './Child.vue'
const money = ref(100)
const msg = ref('啦啦啦')
const age1 = ref(20)
</script>

<template>
  <div class="test-page">
    <h1>父组件 --- {{ money }} --- {{ msg }} -- {{ age1 }}</h1>
    <hr />
    <!-- vue3 v-model的写法 -->
    <!-- <Child v-model:money="money" v-model:msg="msg"></Child> -->
    <Child
      v-model="age1"
      v-model:money="money"
      :msg="msg"
      @update:msg="msg = $event"
    ></Child>
  </div>
  <!-- 
    v-model="msg"
    :xx="msg" @update:xx="msg=$event"

   -->
</template>

<style lang="scss" scoped></style>
